﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BuildPlannerLib.Buildings;

namespace BuildPlannerLib.Terran.Buildings
{
    public class SupplyDepot : Building
    {
        // List field for individual production buildings
        public List<IndividualSupplyDepot> IndividualBuildings;

        // Basic constructor
        public SupplyDepot()
        {
            Name = "Supply Depot";

            MineralCost = 100;
            TimeDuration = 3000;

            SupplyProduced = 8;

            IndividualBuildings = new List<IndividualSupplyDepot>();
        }

        // Overrides GetCount() to return the number of objects in the IndividualBuildings list
        public override int GetCount()
        {
            return IndividualBuildings.Count();
        }

        // Overrides AddBuilding() to add a new instance of IndividualBuilding to the IndividualBuildings list
        public override void AddBuilding()
        {
            IndividualBuildings.Add(new IndividualSupplyDepot());
        }

        // Overrides Reset() to clear the IndividualBuildings list
        public override void Reset()
        {
            IndividualBuildings.Clear();
            Started = 0;
        }
    }
}
